/*
 * Cntysoft Cloud Software Team
 * 
 * @author Shuai <ln6265431@163.com>
 * @copyright  Copyright (c) 2010-2015 Cntysoft Technologies China Inc. <http://www.cntysoft.com>
 * @license   http://www.cntysoft.com/license/new-bsd     New BSD License
 */
/*
 * Cntysoft Cloud Software Team
 *
 * @author Shuai <ln6265431@163.com>
 * @copyright  Copyright (c) 2010-2015 Cntysoft Technologies China Inc. <http://www.cntysoft.com>
 * @license   http://www.cntysoft.com/license/new-bsd     New BSD License
 */
//把下面调用的函数都写成单个文件
define(function (require) {
   var test=false;
   var $ = require('zepto');
   $("#types").click(function(){
      if (test==false) {
         $("#shade").show();
         $("#items").animate({
            left: '0px'
         }, 700, 'ease-out',function(){
            $("#arrow").animate({
               rotate:('-180deg')
            },400,'ease-out');
         });
         test = true;
      }
      else
      {
         $("#items").animate({
            left: '-700px'
         }, 700, 'ease-out',function(){
            $("#shade").hide();
            $("#arrow").animate({
               rotate:('0deg')
            });
         });
         test = false;


      }
      $("#close").click(function(){
         if(test==true){
            $("#items").animate({
               left: '-700px'
            }, 700, 'ease-out',function(){
               $("#shade").hide();

            });
            test = false;
            $("#arrow").animate({
               rotate:('0deg')
            });
         }
      });

   });
});